 {include file="index@public/header" /}
<style type="text/css">
  ::-webkit-scrollbar{
    width:8px;
    height: 6px;
  }
  ::-webkit-scrollbar-thumb{
    border-radius: 10px;
    box-shadow: 0 0 1px rgb(255 255 255 / 50%);
    background-color: rgba(0, 0, 0, .2);
  }
  ::-webkit-scrollbar-track-piece{
    border-radius: 10px;
    box-shadow: 0 0 1px rgb(255 255 255 / 50%);
    background-color: #ededed;
  }
  
  @media screen and (min-width: 768px) {
    .pc-list{display: block;}
    .phone-list{display: none;}
    .phone-balllist-tab{display: none;}
  }
  @media screen and (max-width: 768px) {
      .pc-list{display: none;}
      .phone-list{display: block;}
      .phone-balllist-tab{display: block;}
  }
  
  .selall img{float: left;margin-top:2px;}
  .selzhi{
    color:#36648a;text-decoration:none;font: 12px/14px arial,helvetica,sans-serif;
    display: inline-block;
    width:100%;
    float: left;
  }
  /*.selzhi:hover{
     background-color: #36648a;
  }*/
  /*.selall:hover{
    background-color: #36648a;
  }*/
  .selall:hover{
    background-color: #36648a;
  }
  .selall:hover a{
    color: #ffffff;
  }
  body{background-color:#ffffff}
  .gaol{background-color: #EFEFEF;}
  .delail_list{margin-top:10px;cursor:pointer;}
  .Part_No {color:#36648a;}
  .delail_list .price-a{color:#19792f}
  .delail_list:hover{background-color: #36648a;}
  .delail_list:hover div {color:#ffffff;background-color: #36648a;}

   #gengduoli {padding: 3px;}
   #gengduoli>.gengduoli,  #gengduoli1>.gengduoli {
      text-align: justify;
      max-width: 1230px;
      width: 98%;
  }
  #gengduoli>.gengduoli *{
    margin: unset;
    padding: revert;
    list-style: revert;
  }

  #gengduoli1>.gengduoli *{
    margin: unset;
    padding: revert;
    list-style: revert;
  }
.balllist .balllist-a a{display:block;}
.balllist .balllist-a a:hover{color:#36648A;}
.balllist .balllist-a a:hover .plist{border:1px solid #36648A;}
.balllist-a{
  padding: 5px 8px;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
}
.balllist-h{
  margin-left: 5px;
  padding-bottom:2px;
 }
          
.plist{
  height: 100px;
  border:1px solid #ccc;
  border-radius: 8px;
  padding:10px 5px 5px 5px;
  display: flex;
}
.plist-left{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plist-right{
  flex:3;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plist-title{
  width: 100%;
  padding-bottom: 5px;
 font: 14px/16px Titillium Web,sans-serif;
}
          
.plist-desc{
  color: #333;
  line-height:16px;
}
.plist-icon img{
  max-width: 75%;
  object-fit: contain;
  object-position: 50% 50%;
}
.balllist a{text-decoration:none;}

@media screen and (max-width:768px) {
  .balllist .balllist-a .plist{padding:3px;}
  .balllist .balllist-a .plist .plist-title{padding-bottom:2px;font-size:14px}
}
.layui-flow-more {position:absolute;left: calc(50% - 60px);width:120px;}
#demo3 {margin-top:27px;display: flex;justify-content: center;}
#demo3 .layui-laypage .layui-laypage-curr .layui-laypage-em{background-color: #36648a;}
         
/*分页*/
.pagination{height: 20px;line-height:20px;}
.pagination li { float: left;text-align:center;cursor:pointer; padding: 0px 5px;}
.pagination li a{width:100%;height:100%;display:inline-block;text-decoration: none;}          
.pagination .disabled{color:#e2e2e2}
.pagination .active{text-decoration: underline;}
</style>

<div class='pc-list' style='font: 12px/14px arial,helvetica,sans-serif;'>
  <div style="margin-top: 66px;background-color:#fff !important">
   <!-- 左侧筛选 -->
      <div class='list-left' id="list-left" style="width: 248px;float:left;position:sticky;top:66px;position:-webkit-sticky;">
      <div id="list-left-a" style="overflow-x:hidden;overflow-y:auto;height: calc(100vh - 69px);border:1px solid #E4E3E2;width:98%;margin-left:1%;border-radius:3px;margin-bottom:5px;">
        <div style="margin:0;height:100%;">
          {foreach $listkey as $key=>$vo }
          <?php if(!empty($vo['data'])){ ?>

          <div style="border-bottom: 1px solid black;padding-bottom:10px;background-color:#EFEFEF">
            <div style="height:30px;line-height:30px;padding-left:5px">
              <?php if(!empty($vo['alias'])){ ?><div>{$vo['alias']}</div><?php }else{ ?><div>{$vo['wname']}</div><?php }?>
            </div> 
            <div style="padding-left:5px;background-color: #EFEFEF">
                <?php if(!empty($vo['img'])){?>
                  <div style="text-align:center;margin-bottom:5px;">
                    <img style="width: 100px" src="{:Config::get('app.images_host').$vo['img']}?format=webp">
                  </div>  
                <?php } ?>
                <?php if($vo['is_images']=='1'){?>
                <div style="display:flex;  flex-wrap:wrap; align-items:center; text-align:center;">
                    {foreach $vo['data'] as $k1=>$v1 }
                     <?php if(!empty($v1['value'])&&$v1['value']!=''){?>
                    <?php 
                      if($vo['is_nosearch']==1){
                        $shai_url=$v1['url'];
                      }else{
                        if(empty($get)){
                            if($vo['is_range']==1){
                              
                              //范围存在倍数，(min/max) * 倍数
                              if($v1['times']>0){
                                $v1['min'] *= $v1['times'];
                                $v1['max'] *= $v1['times'];
                              }

                              if($v1['max']==0){
                                $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                              }else{
                                $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                              }
                            }else{
                              $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['value']);
                            }
                        }else{
                            $shai_url=$base_data['no_parameter_url'].'?';
                            foreach ($get as $getkey => $getvalue) {
                              if($getkey=='part_number'){ $getkey='p';}
                              if($getkey!=str_replace(' ','_',$vo['wname'])){
                                $shai_url.=$getkey.'='.$getvalue.'&';
                              }
                            }
                            if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['value']){
                              $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                            }else{
                              if($vo['is_range']==1){

                                //范围存在倍数，(min/max) * 倍数
                                if($v1['times']>0){
                                  $v1['min'] *= $v1['times'];
                                  $v1['max'] *= $v1['times'];
                                }

                                if(isset($get[str_replace(' ','_',$vo['wname'])])){
                                    $range=explode('~',$get[str_replace(' ','_',$vo['wname'])]); 
                                    if($range[1]=='more'){
                                      $range[1]=0;
                                    }
                                    if($range[0]==$v1['min'] && $range[1]==$v1['max']){
                                      $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                                    }else{
                                      if($v1['max']==0){
                                        $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                                      }else{
                                        $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                                      }
                                    }
                                }else{
                                  if($v1['max']==0){
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                                  }else{
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                                  }
                                }
                              }else{
                                $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['value']);
                              }
                            }
                        }
                      }
                    ?>

                    <div style="width: calc(100% / 2); height: 70px;">
                      <a href="{$shai_url}"><img src="{:Config::get('app.images_host')}{$v1['images']}" style="height: 35px; object-position: 50% 50%;"></a>
                      <a href="{$shai_url}" style="text-decoration: none;"><div>{$v1['value']}</div></a>
                    </div>
                    <?php } ?>
                    {/foreach}
                    <div style="clear:both"></div>
              </div>
                <?php }else{ ?>
                <?php if($vo['is_have_input']=='1'||count($vo['data'])>30){?>
                <div style="text-align:center;width:90%;margin-left:3px;margin-bottom:5px">
                  <input type="text" name="sel<?php echo md5($vo['wname']);?>" placeholder="Enter filter value" onkeyup="selinput_zi('sel<?php echo md5($vo['wname']);?>')" style="border: 1px solid #ccc;border-radius:3px;height:20px;width:100%;padding-left:5px;margin-left:-3px" placeholder="Enter Part No." autocomplete="off">
                </div>
                <div style="text-align:center;padding:3px 5px;border:1px solid #ccc;overflow-y:auto;overflow-x: hidden;height:170px;background-color:#ffffff;width:88%;">

                  {foreach $vo['data'] as $k1=>$v1 }
                   <?php if(!empty($v1['value'])&&$v1['value']!=''){?>
                  <div style="width:100%; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="sel<?php echo md5($vo['wname']);?>body-left-div selall">
                    <!-- 生成链接 -->
                    <?php 
                      if($vo['is_nosearch']==1){
                        $shai_url=$v1['url'];
                      }else{
                        if(empty($get)){
                            if($vo['is_range']==1){

                              //范围存在倍数，(min/max) * 倍数
                              if($v1['times']>0){
                                $v1['min'] *= $v1['times'];
                                $v1['max'] *= $v1['times'];
                              }

                              if($v1['max']==0){
                                $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                              }else{
                                $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                              }
                            }else{
                              $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['value']);
                            }
                        }else{
                            $shai_url=$base_data['no_parameter_url'].'?';
                            foreach ($get as $getkey => $getvalue) {
                              if($getkey=='part_number'){ $getkey='p';}
                              if($getkey!=str_replace(' ','_',$vo['wname'])){
                                $shai_url.=$getkey.'='.$getvalue.'&';
                              }
                            }
                            if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['value']){
                              $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                            }else{
                              if($vo['is_range']==1){

                                //范围存在倍数，(min/max) * 倍数
                                if($v1['times']>0){
                                  $v1['min'] *= $v1['times'];
                                  $v1['max'] *= $v1['times'];
                                }

                                if(isset($get[str_replace(' ','_',$vo['wname'])])){
                                    $range=explode('~',$get[str_replace(' ','_',$vo['wname'])]); 
                                    if($range[1]=='more'){
                                      $range[1]=0;
                                    }
                                    if($range[0]==$v1['min'] && $range[1]==$v1['max']){
                                      $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                                    }else{
                                      if($v1['max']==0){
                                        $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                                      }else{
                                        $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                                      }
                                    }
                                }else{
                                  if($v1['max']==0){
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                                  }else{
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                                  }
                                }
                              }else{
                                $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['value']);
                              }
                            }
                        }
                      }
                    ?>
                    <a href="{$shai_url}" class="sel<?php echo md5($vo['wname']);?>body-left-zhi selzhi" style="padding-left:5px; text-decoration: none;">
                      <?php if($vo['is_range']==1&&isset($get[str_replace(' ','_',$vo['wname'])])){  

                        //范围存在倍数，(min/max) * 倍数
                        if($v1['times']>0){
                          $v1['min'] *= $v1['times'];
                          $v1['max'] *= $v1['times'];
                        }

                        $range=explode('~',$get[str_replace(' ','_',$vo['wname'])]); 
                        if($range[1]=='more'){
                          $range[1]=0;
                        } ?>
                       <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $range[0]==$v1['min'] && $range[1]==$v1['max']){?>
                        <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                        <?php } ?>
                      <?php }else{ ?>
                      <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['value']){?>
                      <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                      <?php } ?>
                      <?php } ?>
                      <span>{$v1['value']}</span>
                    </a>
                  </div>
                  <?php } ?>
                  {/foreach}
                  <div style="clear:both"></div>
                </div>
                <?php }else{ ?>
                <?php 
                  $length = count($vo['data']); 
                  if($length<=10){
                    $height='auto';
                    $width="100%";
                  }else{
                    if($length>10 && $length<=20){
                      $height='calc(16px * 10)';
                      $width="50%";
                    }
                    if($length>20 && $length<=30){
                       $height='calc(16px * 10)';
                       $width="33%";
                    }
                  }   
                ?>
                <div style="display:flex; flex-direction: column; flex-wrap:wrap; height:{$height};  align-items:center; text-align:left;">
                  {foreach $vo['data'] as $k1=>$v1 }
                   <?php if(!empty($v1['value'])&&$v1['value']!=''){?>
                  <div style="width:{$width}; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="selall">
                    <!-- 生成链接 -->
                    <?php 
                      if($vo['is_nosearch']==1){
                        $shai_url=$v1['url'];
                      }else{
                        if(empty($get)){
                            if($vo['is_range']==1){
                             
                              //范围存在倍数，(min/max) * 倍数
                              if($v1['times']>0){
                                $v1['min'] *= $v1['times'];
                                $v1['max'] *= $v1['times'];
                              }

                              if($v1['max']==0){
                                $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                              }else{
                                $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                              }
                            }else{
                              $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['value']);
                            }
                        }else{
                            $shai_url=$base_data['no_parameter_url'].'?';
                            foreach ($get as $getkey => $getvalue) {
                              if($getkey=='part_number'){ $getkey='p';}
                              if($getkey!=str_replace(' ','_',$vo['wname'])){
                                $shai_url.=$getkey.'='.$getvalue.'&';
                              }
                            }
                            if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['value']){
                              $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                            }else{
                              if($vo['is_range']==1){

                                //范围存在倍数，(min/max) * 倍数
                                if($v1['times']>0){
                                  $v1['min'] *= $v1['times'];
                                  $v1['max'] *= $v1['times'];
                                }

                                if(isset($get[str_replace(' ','_',$vo['wname'])])){
                                    $range=explode('~',$get[str_replace(' ','_',$vo['wname'])]); 
                                    if($range[1]=='more'){
                                      $range[1]=0;
                                    }
                                    if($range[0]==$v1['min'] && $range[1]==$v1['max']){
                                      $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                                    }else{
                                      if($v1['max']==0){
                                        $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                                      }else{
                                        $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                                      }
                                    }
                                }else{
                                  if($v1['max']==0){
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~more';
                                  }else{
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.$v1['min'].'~'.$v1['max'];
                                  }
                                }
                              }else{
                                $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['value']);
                              }
                            }
                        }
                      }
                    ?>
                    <a href="{$shai_url}" class="selzhi" style="padding-left:5px; text-decoration: none;">
                      <?php if($vo['is_range']==1&&isset($get[str_replace(' ','_',$vo['wname'])])){ 

                        //范围存在倍数，(min/max) * 倍数
                        if($v1['times']>0){
                          $v1['min'] *= $v1['times'];
                          $v1['max'] *= $v1['times'];
                        }

                        $range=explode('~',$get[str_replace(' ','_',$vo['wname'])]); 
                        if($range[1]=='more'){
                          $range[1]=0;
                        } ?>
                       <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $range[0]==$v1['min'] && $range[1]==$v1['max']){?>
                        <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                        <?php } ?>
                      <?php }else{ ?>
                      <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['value']){?>
                      <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                      <?php } ?>
                      <?php } ?>
                      <span>{$v1['value']}</span>
                    </a>
                  </div>
                  <?php } ?>
                  {/foreach}
                </div>
                <?php } ?>
                <?php } ?>
            </div>
          </div>
         <?php } ?>
         {/foreach} 
        </div>
      </div>
    </div>
    <!-- 右侧主体内容 -->
    <div class='list-right' style="width: calc(100% - 248px);;float: right;padding-bottom: 0px;">
      <div style="padding: 2px 5px">
        <!-- 面包屑 -->
        <div class="layui-breadcrumb" lay-separator="/" style="visibility: visible;">
          {foreach $crumbs as $k=>$v }
          <?php if($k!=count($crumbs)-1){?>
          <a href="/{$v['crumbs_url']}" style="font: 12px/14px arial,helvetica,sans-serif;color:#36648A">{$v['cname']}</a>
          <?php }else{ ?>
          <a style="font: 12px/14px arial,helvetica,sans-serif;"><cite>{$class_info['cname']}</cite></a>
          <?php } ?>
          {/foreach}
        </div>
        
        <?php if(!empty($brand_data[0])){?>
        <div style="margin:5px 0px">
          <ul style="display: flex;flex-wrap: wrap;">
              <li>Equivalent to Manufacturer : </li>
              {foreach $brand_data as $k=>$v }
              <li style="padding:0px 5px"><a href="/product/brand/{$v['route_name']}/">{$v['name']}</a></li>
              {/foreach}
          </ul>
        </div>
        <?php } ?>
        <!-- 筛选信息 -->
        <?php if(!empty($get)){?>
        <div style="padding:5px 10px">
          <div style="display:inline-block;color:#36648a;cursor:pointer;" onclick="clearall()">{:lang('Clear All')}</div>
          {foreach $get as $key=>$vo }
          <?php 
            if($key=='part_number'){ 
              $key='Part_Number'; 
            }
          ?>
          <div style="display:inline-block;margin-left:10px;border:1px solid #ccc;padding:0px 5px;border-radius:3px">
            <span>{:str_replace('_',' ',$key)}</span> | <span>{$vo}</span> <i class="layui-icon layui-icon-close" style="font-size:12px;margin-top:2px;cursor:pointer;" onclick="del_search('{$key}','{$vo}')"></i></div>
          {/foreach}
        </div>
        <?php } ?>

       <!-- h1和产品数量 -->
        <?php
          if(empty($class_info['alias_name'])){
            $h1_str=$class_info['cname'];
          }else{ 
            $h1_str=$class_info['alias_name'];
          }
          if(empty($get)){
              $h1=$h1_str;
          }else{
              $h1xz="";
              foreach ($get as $key=>$vo) {
                $h1xz.=str_replace('_',' ',$key)." ".$vo.", ";
              }
              $h1=rtrim($h1xz,', ').' '.$h1_str;
          }
        ?>
        <div style="background-color: #EFEFEF;height:32px;line-height:32px;">
          <h1 style="display: inline;font-size:18px;padding-left:5px">{$h1}</h1>
          <span style="padding: 0px 20px">{$table_count} Products</span>
        </div>
        
        <!-- 页面描述 --> 
        <?php if(empty($get)){?>
        <?php if(!empty($classify_content['total_des'])){?>
          <div id='gengduoli'>
            <div class='gengduoli'>
            <!-- 以</p>标签分组 若没有该标签直接显示 若存在 默认显示第一个<p>标签 其余的以点击more形式展示 -->
            <?php $content_ex=explode("</p>",htmlspecialchars_decode($classify_content['total_des']));if(count($content_ex)>3){?>
            {:htmlspecialchars_decode($content_ex[0])."</p>"}{:htmlspecialchars_decode($content_ex[1])."</p>"}{:htmlspecialchars_decode($content_ex[2])."<span style='cursor:pointer;color:#36648a;font-style:italic;' id='detailmoreid'>More</span></p>"}
            <div style="display:none" id='detailmore'>
            <?php for($i=3;$i<count($content_ex);$i++){?>
            <?php if($i+1==count($content_ex)){?>    
            {:htmlspecialchars_decode($content_ex[$i])."<span style='cursor:pointer;color:#36648a;font-style:italic;' id='detailcloseid'>Close</span></p>"}
            <?php }else{ ?>
            {:htmlspecialchars_decode($content_ex[$i])}
            <?php } ?>
            <?php } ?>
            </div>
            <?php }else{ ?>
            {:htmlspecialchars_decode($classify_content['total_des'])}
            <?php } ?>
            </div>
          </div>  
        <?php } ?>
      <?php }else{ ?> 
      <?php if(!empty($classify_content['filter_total_des'])){?>
        <div id='gengduoli'>
          <div class='gengduoli'>
           {:htmlspecialchars_decode(str_replace('[SEOstr]',$SEOstr,$classify_content['filter_total_des']))} 
          </div>
        </div>
        <?php } ?>
      <?php } ?> 
         
       <!-- 下方表格 -->
        <div style="margin-top:3px;">
          <div class="posit-boxs" style="margin-bottom: 20px">

            <!-- 分类名称 链接 简单描述 -->
            <div style="position:-webkit-sticky;position:sticky;top:63px;z-index:999;">
                <div style="background-color:#ffffff;padding: 5px 0px 5px 3px;">
                  <img style="height:42px;padding: 0px 5px" src="{:Config::get('app.images_host').$class_info['img']}?format=webp" alt="{$class_info['cname']}">
                  <?php if(empty($class_info['alias_name'])){?>
                  <a href="" style="font-size:13px;">{$class_info['cname']}</a>
                  <?php }else{ ?>
                  <a href="" style="font-size:13px;">{$class_info['alias_name']}</a>
                  <?php } ?>
                  <?php if(!empty($classify_content['tab_title_des'])){?>
                  <span style="font-style: italic;margin-left:10px">{$classify_content['tab_title_des']}</span>
                  <?php } ?>
                </div>
            </div> 

            <!-- 主体表格 -->
            <div style='display:inline-table;position:relative;padding-bottom:20px;' id='LAY_demo1'>

              <!-- 表头 -->
              <div style="background-color:#EFEFEF;display:table-row;" id='sdsds'>
                <div style="color:#333;display:table-cell;vertical-align: middle;padding:5px 10px 5px 3px;border-bottom:1px solid black;position:-webkit-sticky;position:sticky;top:115px;background-color:#EFEFEF;max-width: 150px;word-break:break-all;">Part Number
                  <span style="cursor: pointer;">
                    <img id='open_filter_part_show' style="width:14px;" title='Filter Part' src="{:Config::get('app.images_host')}/images/web/filter.png">
                  </span>
                </div> 
                {foreach $table_title as $v=>$k }
                <div style="color:#333;display:table-cell;vertical-align: middle;padding:5px 10px 5px 3px;border-bottom:1px solid black;position:-webkit-sticky;position:sticky;top:115px;background-color:#EFEFEF;max-width: 150px;word-break:break-all;">
                  <!-- 每个表头内容在哪里换行判断，防止表格宽度过宽 -->
                  <?php
                     $new_space_str='';
                      $space=explode(' ',trim($k));
                      $space_i=0;
                      $new_space=array();
                      if(count($space)<=2){
                        if(count($space)==1){
                          $new_space[$space_i]=$space[0];
                        }
                        if(count($space)==2){
                          $a=$space[0]." ".$space[1];
                          if(strlen($a)>10){
                            $new_space[0]=$space[0];
                            $new_space[1]=$space[1];
                          }else{
                            $new_space[$space_i]=$space[0]." ".$space[1];
                          }
                        }
                      }else{
                        if(count($space)>=5){
                          if(count($space)%3!=0){
                            for($space_i=0; $space_i < count($space)-1; $space_i++) {
                              if($space_i%3==2){
                                $new_space[]=$space[$space_i-2]." ".$space[$space_i-1]." ".$space[$space_i];
                              }
                            }
                              $new_space[]=$space[count($space)-1];
                            }else{
                              for($space_i=0; $space_i < count($space); $space_i++) {
                                if($space_i%3==2){
                                  $new_space[]=$space[$space_i-2]." ".$space[$space_i-1]." ".$space[$space_i];
                                }
                            }
                          }
                        }else{
                          if(count($space)%2==1){
                            for($space_i=0; $space_i < count($space)-1; $space_i++) {
                              if($space_i%2==1){
                                $new_space[]=$space[$space_i-1]." ".$space[$space_i];
                              }
                            }
                             $new_space[]=$space[count($space)-1];
                          }else{
                            for($space_i=0; $space_i < count($space); $space_i++) {
                              if($space_i%2==1){
                                $new_space[]=$space[$space_i-1]." ".$space[$space_i];
                              }
                            }
                          }
                      }

                      }
                  
                      foreach ($new_space as $new_space_k=>$new_space_v) {
                          $new_space_str.=$new_space_v."<br/>";
                      }
                      echo substr($new_space_str,0,-5);  
                  ?>
                </div>
                {/foreach}
                <?php if($is_show_price==1){?>
                <div style="color:#333;display:table-cell;vertical-align: middle;padding:5px 10px 5px 3px;border-bottom:1px solid black;position:-webkit-sticky;position:sticky;top:115px;background-color:#EFEFEF;max-width: 150px;word-break:break-all;">Price</div>
                <?php } ?> 
              </div>

              <!-- 型号附近的筛选 -->
              <div style="position:sticky;z-index:999;background-color:#EFEFEF;display: none;height: 30px;line-height: 30px; padding:5px;border-bottom: 1px solid black;border-left: 1px solid black;border-right: 1px solid black;" id="open_filter_part">
                <input style="width:115px;border:1px silid black;padding: 5px;" id="filter_words" placeholder="Enter part filter words'" type="text" >
                <button type="button" id='filter_words_button' style="font-size:12px;cursor:pointer;padding: 5px;" onclick="Part_No_sel({$class_info['id']})">submit</button>
              </div>

              <!-- 表格里的内容 -->
              {foreach $table_data as $k=>$v }
              <a class='delail_list' style="display:table-row;color:#333;text-decoration:none" href="/products/{$v['url_product']}/">
                <div class="Part_No" style="display:table-cell;padding:0px 10px 0px 3px;" class="Product">{$v['part_number']}</div>
              {foreach $v as $k1=>$v1 }
              <?php if(in_array(str_replace('_',' ',$k1),$table_limit)) {?>
              <?php if(!empty($v1)){?>
              <!-- 在筛选内容中 添加class="gaol" 高亮显示 -->
                <div style="display:table-cell;padding:0px 10px 0px 3px;">{$v1}</div>
              <?php }else{ ?>
                <div style="display:table-cell;padding:0px 10px 0px 3px;">-</div>
              <?php } ?>
              <?php } ?>
              {/foreach}
              <?php if($is_show_price==1){?>
                 <?php if($v['price']==0){?>
                <div style="display:table-cell;padding:0px 10px 0px 3px;" class='price-a'>-</div>
                <?php }else{ ?>
                <div style="display:table-cell;padding:0px 10px 0px 3px;" class='price-a'>$ {$v['price']}</div>
                <?php } ?>
              <?php } ?>  
              </a>
              {/foreach}

            </div>
            <!-- 分页前梳理数据 -->
            <?php 
              if($table_count>Config::get('app.list_page_num')){
                $all_page=ceil($table_count/Config::get('app.list_page_num'));
                $purl=del_gclid2($base_data['current_url'],'page');
                $purl=explode('?',$purl);
                if(empty($get['page'])&&!isset($get['page'])){
                  $dpage=1;
                }else{
                  $dpage=$get['page'];
                }
                $dpagejina=$dpage-1;
                if($dpagejina<=1){ $jian='';}else{ 
                  if(count($purl)>1&&!empty($purl[1])){
                    $jian='&page='.$dpagejina;
                  }else{
                    $jian='?page='.$dpagejina;
                  }
                }
                $dpagejia=$dpage+1;
                if($dpagejia>=$all_page){ $jia=$all_page;}else{ 
                  $jia=$dpagejia;
                }
            ?>
            <!-- 分页按钮 -->
            <div id="demo3" >
              <ul class="pagination">
                <?php if(count($purl)>1&&!empty($purl[1])){?>
                <li><a href="{$purl[0]}?{$purl[1]}{$jian}">---</a></li>
                <?php }else{ ?>
                <li><a href="{$purl[0]}{$jian}">---</a></li>
                <?php } ?>
                <?php if($all_page<=6){?>
                  <li>
                  <?php if(count($purl)>1&&!empty($purl[1])){?>
                  <?php if($dpage==1){?>
                  <a href="{$purl[0]}?{$purl[1]}" class="active" >1</a>
                   <?php }else{ ?>
                   <a href="{$purl[0]}?{$purl[1]}" >1</a>
                   <?php } ?>
                  <?php }else{ ?>
                    <?php if($dpage==1){?>
                    <a href="{$purl[0]}" class="active" >1</a>
                    <?php }else{ ?>
                    <a href="{$purl[0]}" >1</a>
                  <?php } ?>
                  <?php } ?>
                 </li>
                  <?php for($i=2;$i<=$all_page;$i++){?>
                <li>
                  <?php if(count($purl)>1&&!empty($purl[1])){?>
                    <?php if($dpage==$i){?>
                    <a href="{$purl[0]}?{$purl[1]}&page={$i}" class="active" >{$i}</a>
                    <?php }else{ ?>
                    <a href="{$purl[0]}?{$purl[1]}&page={$i}" >{$i}</a>
                    <?php } ?>
                  <?php }else{ ?>
                  <?php if($dpage==$i){?>
                    <a href="{$purl[0]}?page={$i}" class="active" >{$i}</a>
                    <?php }else{ ?>
                    <a href="{$purl[0]}?page={$i}" >{$i}</a>
                    <?php } ?>
                  <?php } ?>
                </li>
                <?php } ?>
                <?php }else{ ?>
                <li>
                <?php if(count($purl)>1&&!empty($purl[1])){?>
                  <?php if($dpage==1){?>
                  <a href="{$purl[0]}?{$purl[1]}" class="active" >1</a>
                   <?php }else{ ?>
                   <a href="{$purl[0]}?{$purl[1]}" >1</a>
                   <?php } ?>
                  <?php }else{ ?>
                    <?php if($dpage==1){?>
                    <a href="{$purl[0]}" class="active" >1</a>
                    <?php }else{ ?>
                    <a href="{$purl[0]}" >1</a>
                  <?php } ?>
                  <?php } ?>
                 </li>
                 <?php if($dpage%5==0||$dpage>=5){?>
                  <li class="disabled" style="margin-top:-3px"><span style="color:black;">...</span></li>
                 <?php } ?>  
                 <?php for($i=$dpage-2;$i<$dpage;$i++){?>
                  <?php if($i>1){?>
                    <li>
                      <?php if(count($purl)>1&&!empty($purl[1])){?>
                        <?php if($dpage==$i){?>
                        <a href="{$purl[0]}?{$purl[1]}&page={$i}" class="active" >{$i}</a>
                        <?php }else{ ?>
                        <a href="{$purl[0]}?{$purl[1]}&page={$i}" >{$i}</a>
                        <?php } ?>
                      <?php }else{ ?>
                      <?php if($dpage==$i){?>
                        <a href="{$purl[0]}?page={$i}" class="active" >{$i}</a>
                        <?php }else{ ?>
                        <a href="{$purl[0]}?page={$i}" >{$i}</a>
                        <?php } ?>
                      <?php } ?>
                    </li>
                  <?php } ?>
                  <?php } ?>
                  <?php for($i=$dpage;$i<=$dpage+2;$i++){?>
                    <?php if($i>1&&$i<$all_page){?>
                    <li>
                      <?php if(count($purl)>1&&!empty($purl[1])){?>
                        <?php if($dpage==$i){?>
                        <a href="{$purl[0]}?{$purl[1]}&page={$i}" class="active" >{$i}</a>
                        <?php }else{ ?>
                        <a href="{$purl[0]}?{$purl[1]}&page={$i}" >{$i}</a>
                        <?php } ?>
                      <?php }else{ ?>
                      <?php if($dpage==$i){?>
                        <a href="{$purl[0]}?page={$i}" class="active" >{$i}</a>
                        <?php }else{ ?>
                        <a href="{$purl[0]}?page={$i}" >{$i}</a>
                        <?php } ?>
                      <?php } ?>
                    </li>
                  <?php } ?>
                  <?php } ?>
                 <?php if(($all_page-$dpage)>3){?>
                 <li class="disabled" style="margin-top:-3px"><span style="color:black;">...</span></li>
                  <?php } ?>
                   <li>
                      <?php if(count($purl)>1&&!empty($purl[1])){?>
                        <?php if($dpage==$all_page){?>
                        <a href="{$purl[0]}?{$purl[1]}&page={$all_page}" class="active" >{$all_page}</a>
                        <?php }else{ ?>
                        <a href="{$purl[0]}?{$purl[1]}&page={$all_page}" >{$all_page}</a>
                        <?php } ?>
                      <?php }else{ ?>
                      <?php if($dpage==$all_page){?>
                        <a href="{$purl[0]}?page={$all_page}" class="active" >{$all_page}</a>
                        <?php }else{ ?>
                        <a href="{$purl[0]}?page={$all_page}" >{$all_page}</a>
                        <?php } ?>
                      <?php } ?>
                    </li>
                <?php } ?>
                <?php if(count($purl)>1&&!empty($purl[1])){?>
                <li><a href="{$purl[0]}?{$purl[1]}&page={$jia}">---</a></li>
                <?php }else{ ?>
                <li><a href="{$purl[0]}?page={$jia}">---</a></li>
                <?php } ?>
              </ul>
            </div>
            <?php } ?>
            
          </div>
        </div>
      </div>
    </div>
    <div class="clear"></div>
  </div>  

</div>
  

{include file="index@public/footer" /}
<script type="text/javascript">
layui.use("element", function () {
  var element = layui.element;
});
var LAY_demo1_width=$("#LAY_demo1").width();
$('#demo3').width(LAY_demo1_width);

$('#open_filter_part').css('top',$("#sdsds").height()+115+"px")
$(document).ready(function(){
  $("#detailmoreid").click(function(){
    $("#detailmore").show();
    $("#detailmoreid").hide();
  });
  $("#detailcloseid").click(function(){
    $("#detailmore").hide();
    $("#detailmoreid").show();
  });

  $("#open_filter_part_show").click(function(){
    $("#open_filter_part").css('display','block')
  });

  $('body').click(function(e) {
    var target = $(e.target);
    if(!target.is('#open_filter_part_show')&&!target.is('#open_filter_part')&&!target.is('#filter_words')&&!target.is('#filter_words_button')) {
      $("#open_filter_part").css('display','none')             
    }
  });
})

/*左侧筛选*/
function selinput_zi(k) {
    let zhi=$('input[name="'+k+'"]').val();
    if(zhi != ''){
      zhi = zhi.toUpperCase();
      $(`.${k}body-left-div`).hide().filter(function(index){
        return $(`.${k}body-left-zhi`+":contains('"+zhi+"')", this).text();
      }).show();
    }else{
      $("."+k+"body-left-div").show();
    } 
}

/*清空*/
function clearall() {
    layer.load(1, {
      shade: [0.1, '#fff'],
      success: function() {
        setTimeout(function() {
          var url = window.location.href; //获取当前页面的url
          if (url.indexOf("?") != -1) { //判断是否存在参数
            url = url.replace(/(\?|#)[^'"]*/, ''); //去除参数
          }
          window.location.href = url;
        }, 1000);
      }
  });
}

/*单个清空*/
function del_search($k, $v) {
    if($k=='Part_Number'){
      $k='p';
    }
    var url = window.location.href; //获取当前页面的url
    let arrUrl = [];
    let changUrl = ''
    if (url.indexOf("?") != -1) { //判断是否存在参数
      arrUrl = url.split('?')[1].split('&')
      //获取参数转换为object
      for (var i = 0; i < arrUrl.length; i++) {
        arrUrl[i] = arrUrl[i].split("=");
      };
      for (var i = 0; i < arrUrl.length; i++) {
        if(arrUrl[i][0]==encodeURI($k)){
                    arrUrl.splice(i,1);
        }
      }
      if(arrUrl.length == 0){
        url = url.split('?')[0];
      }else{
        for (var i = 0; i < arrUrl.length; i++) {
          changUrl+=arrUrl[i][0]+'='+arrUrl[i][1]+'&';
        }

        url=url.split('?')[0]+'?'+changUrl.slice(0, changUrl.length - 1);
      }
      window.location.href=url;
    }
}

function Part_No_sel(class_id){

  layer.load(1);
  var Part_No=$.trim($("#filter_words").val());
  
  if(Part_No==''){
      layer.closeAll('loading');
      layer.msg('Please enter the Part No');
      return false;
  }

  $.post('/index/Api/check_part_number/',{Part_No:Part_No,class_id:class_id},function(res){
    if(res.status=='1'){
      var url = window.location.href;
      if(url.indexOf("?") != -1){
        if(url.indexOf("p=") != -1){
          layer.closeAll('loading');
          var df=url.split("p=");
          var dfs=df[1].split("&");
          var nurl=url.replace("p="+dfs[0],"p="+Part_No)
          window.location.href=nurl;
        }else{
          layer.closeAll('loading');
          window.location.href=url+"&p="+Part_No;
        }
      }else{
        layer.closeAll('loading');
        window.location.href=url+"?p="+Part_No;
      }
    }else{
        layer.msg(res.msg);
        $("#filter_words").val('');
        layer.closeAll('loading');
    }
  })
 }

 /*左侧筛选后，定位滚动条位置*/
<?php if(!empty($get)){?>
if($("#xz-srcoll").length>0){
var a=$("#xz-srcoll").position().top-180;
document.getElementById('list-left-a').scrollTop=a;
}
<?php } ?>

/*最小分类出现加载更多的效果*/
<?php if($table_count>Config::get('app.list_page_num')){?>
var class_id="<?php echo $class_info['id'];?>";
var page="<?php echo $dpage;?>";
var all_page="<?php echo $all_page;?>";
<?php 
  if(!empty($get)){
    $more_url="/index/Api/load_more_data/?";
    foreach ($get as $key => $value) {
      $more_url.=$key."=".trim($value)."&";
    }
    $more_url=rtrim($more_url,'&');
  }else{
    $more_url="/index/Api/load_more_data/";
  }
  $more_url=urlencode($more_url);
?>

var timer = null;
$(document).ready(function() {
  $(window).scroll(function() {

    if ($(document).scrollTop() >= $(document).height() - $(window).height()-50) {
      var str1='';
      var str_phone='';
      clearTimeout(timer);
      timer = setTimeout(function(){
        if(page<all_page){
          $("#LAY_demo1").append("<div class='layui-flow-more'><img style='width:40px' src='{:Config::get('app.images_host')}/images/web/list-loading.gif'></div>");
          $("#list-phone-loading").css('display','block');
          $.post('{:urldecode($more_url)}',{page:page,class_id:class_id},function(res){
            //假设你的列表返回在data集合中
            for (var i = 0; i < res.length; i++) {

              str1+='<a class="delail_list" style="display:table-row;color:#333;text-decoration:none" href="/products/'+res[i]['url_product']+'/">';
              str1+='<div class="Part_No" style="display:table-cell;padding:0px 10px 0px 3px;" class="Product">'+res[i]['part_number']+'</div>';

              for (var k in res[i]) {
                 if(k!='part_number'&&k!='url_product'&&k!='price'){
                    if(res[i][k]!='' && res[i][k]!=null){
                      str1+='<div style="display:table-cell;padding:0px 10px 0px 3px;">'+res[i][k]+'</div>';
                    }else{
                      str1+='<div style="display:table-cell;padding:0px 10px 0px 3px;">-</div>';
                    }
                 }
              }
               <?php if($is_show_price==1){?>
              if(res[i]['price']!=0){
                str1+='<div style="display:table-cell;padding:0px 10px 0px 3px;" class="price-a">$ '+res[i]['price']+'</div>';
              }else{
                str1+='<div style="display:table-cell;padding:0px 10px 0px 3px;" class="price-a">-</div>';
              }
              <?php } ?>
              str1+='</a>';
            }


            $(".layui-flow-more").remove();
            $("#LAY_demo1").append(str1);
            $("#list-phone-loading").css('display','none');
            //$("#list-phone-add").append(str_phone);

          });
          page++;
        }
      },200)
    }
  });
});


<?php } ?>
</script>